package page.Beans;

import java.sql.SQLException;

import basicTypes.RAClient;

public class removeUser {
	private String user;

	public void setUser(String user) {
		this.user = user;
	}

	public String getUser() {
		return user;
	}
	
	public String remUser(loginBean x) throws SQLException{
			RAClient novo;
		try{
			novo = x.getBd().db_getClient(x.getUser(), user).get(0);
		}
		catch(IndexOutOfBoundsException e){
			return "fail";
		}
		
		x.getBd().db_delClient(x.getUser(),novo);
		
		return "suc";
	}
}
